from enum import Enum
from typing import Union

# 定义 TokenType 枚举
class TokenType(Enum):
    BRACE_OPEN = "BraceOpen"
    BRACE_CLOSE = "BraceClose"
    BRACKET_OPEN = "BracketOpen"
    BRACKET_CLOSE = "BracketClose"
    STRING = "String"
    NUMBER = "Number"
    COMMA = "Comma"
    COLON = "Colon"
    TRUE = "True"
    FALSE = "False"
    NULL = "Null"

# 定义 Token 类
class Token:
    def __init__(self, token_type: TokenType, value: str):
        self.type = token_type
        self.value = value

    def get_type(self):
        return self.type.value

    def __repr__(self):
        return f"\n Token: (type={self.type}, value={self.value}) \n"



if __name__ == "__main__":
    # 示例用法
    token = Token(TokenType.STRING, "example")
    print(token)
